/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package NhanVien;

import java.util.ArrayList;

/**
 *
 * @author Sinz
 */
public class DSINFO {
    private ArrayList<Info> dsInfo;
    
    public DSINFO(){
        dsInfo = new ArrayList<Info>();
    }
    
    public ArrayList<Info> getDSNV(){
        return this.dsInfo;
    }
    
    public void setDSNV(ArrayList<Info> DSIF){
        this.dsInfo = DSIF;
    }
    
    //
    public void addNV(Info newIF){
        this.dsInfo.add(newIF);
    }
    
    public void removeNV(Info remIF){
        this.dsInfo.remove(remIF);
    }
    
    //
    public int getCount(){
        return this.dsInfo.size();
    }
    
    public Info getInfo(String msNV){
        for (Info ifo: this.dsInfo){
            if (ifo.getMSNV() == msNV) return ifo;
        }
        return null;
    }
}
